package design.Day02;

/**
* @description: 观察者模式main 模拟气象站信息
* @author: wangjun
* @create: 2022-01-11
*/
public class ObserverMain {
    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData();
        CurrentConditionDisplay conditionDisplay = new CurrentConditionDisplay();
        conditionDisplay.setSubject(weatherData);

        ForecastDisplay forecastDisplay = new ForecastDisplay();
        forecastDisplay.setSubject(weatherData);
        weatherData.setField(80.0f,65.5f,30.4f);
    }
}
